//
// Created by denglibin on 2021/6/1.
//

#ifndef SDL_DEMO_PLANE_H
#define SDL_DEMO_PLANE_H
#include <SDL.h>
//方向
enum Direction{
    NONE = 0,
    LEFT = 1,
    RIGHT = 2,
    UP = 3,
    DOWN = 4
};
//基类
typedef struct base_plane{
    int x, y; //位置
    int w, h;//宽高
    int direction; //方向
    SDL_Texture  * texture; //图片纹理
}BasePlane;

//我的飞机
typedef struct my_plane{
    BasePlane basePlane; //继承
}MyPlane;

//敌机
typedef struct enemy_plane{
    BasePlane basePlane; //继承
}EnemyPlane;

//子弹
typedef struct bullet{
    int x, y, w, h;
    int type; //1:我的， 2:敌人的
    SDL_Texture* texture;
}Bullet;
/**
 * 创建
 * @param texture
 * @param w
 * @param h
 * @return
 */
MyPlane* MyPlaneCreate(SDL_Texture* texture, int w, int h, int x, int y);

/**
 * 释放资源
 * @param myPlane
 */
void MyPlaneFree(MyPlane* myPlane);

#endif //SDL_DEMO_PLANE_H
